/**
 * 首页方法集合
 */

import { state } from "./state";

export const methods = {
    /**
     * @Description 显示故障路口设备列表
     * @date 2021-03-09
     * @returns {void}
     */
    showAlarmFn(dataItem: any): void {
        console.log('显示故障路口设备列表', dataItem);
        state.interName = dataItem.text
        state.warningListFlag = false
        state.alarmListFlag = true
    },

    /**
     * @Description 显示告警路口设备列表
     * @date 2021-03-11
     * @param {any} dataItem
     * @returns {any}
     */    
    warnShowFn(dataItem: { text: string; }): void {
        console.log('显示告警路口设备列表', dataItem);
        state.interName = dataItem.text
        state.alarmListFlag = false
        state.warningListFlag = true
    },

    /**
     * @Description 隐藏故障列表弹窗
     * @date 2021-03-10
     * @returns {void}
     */
    hiddenAlarm(): void {
        state.alarmListFlag = false
    },

    /**
     * @Description 隐藏告警列表弹窗
     * @date 2021-03-10
     * @returns {void}
     */
    hiddenWarn(): void {
        state.warningListFlag = false
    },

    /**
     * @Description 显示路口详情
     * @date 2021-03-09
     * @returns {void}
     */
    interDetailFn(): void {
        console.log('interDetailFn');
        state.interDetailFlag = true
    }
}